<?php 
header('Content-type: application/json;charset=utf-8');
require_once(dirname(__FILE__).'/../include/config.inc.php');
//获取 post的json数据
//获取 goodsid
$id=htmlspecialchars($_POST['id']);
$id=htmlspecialchars($_POST['op']);
if(isset($id)){
	if($op='cui'){
	//新建收藏
	$time=time();
	//获取工单的时间
	$k=$dosql->GetOne("select post_time,jindu from `#@__order` where id='$id'");
	$post_time=$k['post_time']+7200;
	$jindu	  =$k['jindu'];
	
	//判断是否超时
	 if($time>$post_time){
			$json_data=array('msg'=>'ok');
			$dosql->ExecNoneQuery("insert into `#@__order_log`(orderid,op,op_time,jindu) values ('$id','用户撤单','$time','$jindu')");
	 }else{
			$json_data=array('msg'=>'error');
	 }

	$errno=array('errno'=>0);
	
	$json_json=array_merge($errno,$json_data);
	$data=json_encode($json_json);
	echo $data;
	}
}




?>